<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>vue.set</title>
    <script src="../assets/vue.js"></script>
</head>
<body>
<h1>vue.set实例</h1>
<hr>
<div id="app">
    {{count}}
    <ul>
        <li v-for="item in arr">{{item}}</li>
    </ul>

</div>
<p><button onclick="add()">add</button></p>
<script>
    var outData = {
        count:1,
        arr:['aa','bb','cc']
    }
   var app = new Vue({
       el:'#app',
       data:outData,
   })
    function add(){
        Vue.set(app.arr,1,'dd')

    }
</script>
</body>
</html>